// ************************************************************************ //
// The types declared in this file were generated from data read from the
// WSDL File described below:
// WSDL     : http://c479bb659f97497:8080/WebService?wsdl
// Encoding : UTF-8
// Codegen  : [wfMapStringsToWideStrings+, wfUseSettersAndGetters+]
// Version  : 1.0
// (2013-5-11 1:05:59 - - $Rev: 25127 $)
// ************************************************************************ //

#include <vcl.h>
#pragma hdrstop

#if !defined(WebServiceH)
#include "WebService.h"
#endif

namespace NS_WebService {

	_di_SoapService GetSoapService(AnsiString addr, String User,String Password) {
		static const char* defSvc = "WebService";
		static const char* defPrt = "SoapServicePort";
		THTTPRIO* rio = new THTTPRIO(0);
		rio->WSDLLocation = addr;
		rio->Service = defSvc;
		rio->Port = defPrt;
		rio->URL = addr;
		rio->HTTPWebNode->UserName = User;
		rio->HTTPWebNode->Password = Password;
		rio->HTTPWebNode->SendTimeout = 6000000;
		rio->HTTPWebNode->ConnectTimeout = 6000000;
		rio->HTTPWebNode->ReceiveTimeout = 6000000;
		_di_SoapService service;
		rio->QueryInterface(service);
		if (!service)
			delete rio;
		return service;
	}

	// ************************************************************************ //
	// This routine registers the interfaces and types exposed by the WebService.
	// ************************************************************************ //
	static void RegTypes() {
		/* SoapService */
		InvRegistry()->RegisterInterface(__delphirtti(SoapService), L"http://service.web.f4.com/", L"UTF-8");
		InvRegistry()->RegisterDefaultSOAPAction(__delphirtti(SoapService), L"");
		InvRegistry()->RegisterExternalParamName(__delphirtti(SoapService), L"execute", L"return_", L"return");
	}
#pragma startup RegTypes 32

}; // NS_WebService
